package com.ruoyi.swap.realtime.ticker.service.impl;

import java.util.List;

import com.ruoyi.swap.realtime.ticker.domain.VO.SwapTickerRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.realtime.ticker.mapper.SwapTickerRealtimeDataMapper;
import com.ruoyi.swap.realtime.ticker.domain.SwapTickerRealtimeData;
import com.ruoyi.swap.realtime.ticker.service.ISwapTickerRealtimeDataService;

/**
 * 实时TickerService业务层处理
 * 
 * @author saumell
 * @date 2024-08-03
 */
@Service
public class SwapTickerRealtimeDataServiceImpl implements ISwapTickerRealtimeDataService 
{
    @Autowired
    private SwapTickerRealtimeDataMapper swapTickerRealtimeDataMapper;

    /**
     * 查询实时Ticker
     * 
     * @param id 实时Ticker主键
     * @return 实时Ticker
     */
    @Override
    public SwapTickerRealtimeDataVO selectSwapTickerRealtimeDataById(Integer id)
    {
        return swapTickerRealtimeDataMapper.selectSwapTickerRealtimeDataById(id);
    }

    /**
     * 查询实时Ticker列表
     * 
     * @param swapTickerRealtimeData 实时Ticker
     * @return 实时Ticker
     */
    @Override
    public List<SwapTickerRealtimeDataVO> selectSwapTickerRealtimeDataList(SwapTickerRealtimeDataVO swapTickerRealtimeData)
    {
        return swapTickerRealtimeDataMapper.selectSwapTickerRealtimeDataList(swapTickerRealtimeData);
    }

    /**
     * 新增实时Ticker
     * 
     * @param swapTickerRealtimeData 实时Ticker
     * @return 结果
     */
    @Override
    public int insertSwapTickerRealtimeData(SwapTickerRealtimeData swapTickerRealtimeData)
    {
        return swapTickerRealtimeDataMapper.insertSwapTickerRealtimeData(swapTickerRealtimeData);
    }

    /**
     * 修改实时Ticker
     * 
     * @param swapTickerRealtimeData 实时Ticker
     * @return 结果
     */
    @Override
    public int updateSwapTickerRealtimeData(SwapTickerRealtimeData swapTickerRealtimeData)
    {
        return swapTickerRealtimeDataMapper.updateSwapTickerRealtimeData(swapTickerRealtimeData);
    }

    /**
     * 批量删除实时Ticker
     * 
     * @param ids 需要删除的实时Ticker主键
     * @return 结果
     */
    @Override
    public int deleteSwapTickerRealtimeDataByIds(Integer[] ids)
    {
        return swapTickerRealtimeDataMapper.deleteSwapTickerRealtimeDataByIds(ids);
    }

    /**
     * 删除实时Ticker信息
     * 
     * @param id 实时Ticker主键
     * @return 结果
     */
    @Override
    public int deleteSwapTickerRealtimeDataById(Integer id)
    {
        return swapTickerRealtimeDataMapper.deleteSwapTickerRealtimeDataById(id);
    }

    @Override
    public List<SwapTickerRealtimeDataVO> selectSwapAllData() {
        return swapTickerRealtimeDataMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapTickerRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
